home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 14
/
Hot Mix 14.iso
/
HTML
/
vendors
/
finesse
/
examples
/
examples_csh
next >
Wrap
Text File
|
1996-06-27
|
3KB
|
104 lines
#! /bin/csh
# FINESSEAPPLICATIONKEY spjdnVdx_darf
# csh script initialization
if (! $?FINESSEPATH) \
set FINESSEPATH = /usr/local/finesse
source $FINESSEPATH/fscshinit
set examplespath = $FINESSEPATH/examples
set examplespath = /proj/finesse/examples
set appdefpath = $examplespath/app-defaults
set bitmapspath = $appdefpath/bitmaps
set cshdir = $examplespath/csh
# define bitmap/pixmap files
set logo = $bitmapspath/logo
set logoxbm = $bitmapspath/logo.xbm
set logoxpm = $bitmapspath/logo.xpm
set hw = $bitmapspath/hello_world
set hwxbm = $bitmapspath/hello_world.xbm
set hwxpm = $bitmapspath/hello_world.xpm
# make sure XAPPLRESDIR is used to get bitmaps
unsetenv XUSERFILESEARCHPATH
setenv XAPPLRESDIR $appdefpath
# define examples and main window
set nrows = 2; set ftag = f
set j = 0; set k = 0
set examples = "FsForm -name mf;"
foreach i (`(cd $cshdir; ls)`)
set k = `expr $j / $nrows`
expr $j % $nrows > /dev/null
if ( $status == 0 ) then
set form1 =
set form2 =
else
set form1 = "FsForm -name $ftag$k"
set form2 = "-orientation horizontal -parent mf;"
endif
set form = "$form1 $form2"
set push1 = "FsPushButton -label $i -parent $ftag$k"
set push2 = "-name $i -winstat touch;"
set push = "$push1 $push2"
set examples = "$examples $form $push"
set j = `expr $j + 1`
end
set lb = "FsPushButton -name s+c -winstat touch"
set lbargs = "-fsbutton s+c -parent $ftag$k;"
set okb = "FsPushButton -label OK;"
set mainwin = \
"FsWindow -name main; $examples $lb $lbargs $okb"
# use either bitmap or pixmap files
/bin/rm -f $logo $hw
if (( "`uname`" == "OSF1" ) || \
( "`uname`" == "AIX" && "`uname -v`" == "4" ) || \
( "`uname`" == "SunOS" && \
"`uname -r | cut -d. -f1`" == "5" )) then
ln -s $logoxpm $logo; ln -s $hwxpm $hw
else
ln -s $logoxbm $logo; ln -s $hwxbm $hw
endif
# Finesse dialog
Fsopen
Fsdisplay -w "$mainwin"
while (1)
switch ($fsbutton)
case OK:
case a:
break
case s+c:
Fsecho "Finesse by:"
Fsecho "science+computing gmbh"
Fsecho "Hagellocher Weg 71"
Fsecho "D-72070 Tuebingen"
Fsecho "Germany"
Fsecho "Phone: (49) 7071/9457-0"
Fsecho "Fax: (49) 7071/9457-27\c"
set updt = "-r s+c:background:IndianRed3"
breaksw
default:
( unsetenv FSREADFILE FSWRITEFILE; \
$cshdir/$fsbutton )
set updt = "-r ${fsbutton}:background:IndianRed3"
breaksw
endsw
Fsdisplay -n main $updt
end
Fssave
/bin/rm -f $logo $hw
Fsclose